import request from '@/utils/request';

/**
 * 分页查询用户
 */
export async function get_list(params) {
  const res = await request.post('/setting/tenant_price/get_list', {
    ...params
  });
  if (res.data.code === 1) {
    return {
      list: res.data.data.row_list,
      columns: res.data.data.columns,
      searchData: res.data.data.search_area
    };
  }
  return Promise.reject(res.data.msg);
}

export async function price_setting(params) {
  const res = await request.post('/setting/tenant_price/price_setting', params);
  if (res.data.code === 1) {
    return res.data;
  }
  return Promise.reject(res.data.msg);
}

export async function get_price(params) {
  const res = await request.post('/setting/tenant_price/get_price', params);
  if (res.data.code === 1) {
    return res.data.data;
  }
  return Promise.reject(res.data.msg);
}
